package com.example.springsecurity.service;

import com.example.springsecurity.domain.AssignProject;
import com.example.springsecurity.domain.LearnMaterials;
import com.example.springsecurity.domain.Project;
import com.example.springsecurity.domain.Video;
import com.example.springsecurity.utils.ResultBean;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public interface ExperimentService {
    ResultBean addExperiment(Project project, MultipartFile file);

    ResultBean searchExperiment(Integer pageNum, Integer pageSize, String projectName);

    ResultBean updateProject(Project project, MultipartFile file);


    ResultBean searchArrangementProject(Integer pageNum, Integer pageSize, Integer collegeId, Integer majorId, String projectName);

    ResultBean arrangementProject(Project project);


    void exportProject(HttpServletRequest request, HttpServletResponse response);

    ResultBean searchProjectMaintenance(Integer pageNum, Integer pageSize, String projectName,Integer userId);

    ResultBean getProjectMaintenanceDetail(Integer projectId);

    ResultBean editProjectMaintenance(Project project, MultipartFile file,Integer[] shareTeacherIds,Integer[] projectTeaIds);

    ResultBean editProjectVideo(Video video, MultipartFile file);

    ResultBean getProjectVideo(Integer projectId);

    ResultBean deleteProjectVideo(Integer videoId);

    ResultBean updateProjectVideo(Video video, MultipartFile file);

    ResultBean uploadProjectLearn(LearnMaterials learnMaterials, MultipartFile file);

    ResultBean getProjectLearnMaterials(Integer projectId);

    void downloadProjectLearnMaterials(Integer learnId,HttpServletRequest request, HttpServletResponse response);

    ResultBean editProjectReport(Project project);

    ResultBean getProjectReport(Integer projectId);


    ResultBean getProject(Integer projectId);


    /**
     * 根据实验项目的id获取到布置实验时所展示的实验内容
     * @param projectId
     * @return
     */
    public AssignProject getAssignProject(Integer projectId);

    ResultBean checkAssignStatus(Integer projectId);

    ResultBean deleteProject(Integer projectId);

    ResultBean checkProjectAssign(Integer projectId);

    ResultBean deleteProjectMaterials(Integer learnId);

    void downloadProjectFile(Integer projectId,HttpServletRequest request,HttpServletResponse response);
}
